#pragma once

#include <string>
#include <fstream>
#include <ostream>
#include <sstream>
#include <time.h>
#include "Singleton.h"
#include "WinMutex.h"

class LogController : public Singleton<LogController>
{
	friend class Singleton<LogController>;

public:
	enum LogLevel
	{
		L_NOTICE,
		L_WARNING,
		L_FAILURE,
		L_ERROR,
		L_CRITICAL,
		L_SOCKET
	};

	void				AddToLog(LogController::LogLevel, std::string);
	void				startSession(std::string);
	void				stopSession();

private:
	LogController();
	~LogController(void);
	std::string getTimeFormat();
	
private:
	std::string			_logFileName;
	std::ofstream		_logFileStream;
	WinMutex			_mutex;
};

